package com.example.springboot.bean;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/7/5 22:12
 */
@Component
@ConfigurationProperties(prefix = "person")
@Profile("dev") // 在哪个配置文件生效的情况下才生效
public class Manager implements Person{
    private String name;
    private Integer age;
    @Override
    public String getName() {
        return name;
    }

    @Override
    public Integer getAge() {
        return age;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
